void main() {
  Person p1 = new Person();
  p1.name = '小明';
  p1.age = 18;
  print({p1.name, p1.age});
  p1.eat();
}

class Person {
  String? name;
  int? age;

  Person(){
    print('我是默认的构造函数');
  }

  eat(){
    print('$name正在吃东西');
  }
}